package org.example.edusmart.service.impl;

import com.alibaba.dashscope.aigc.generation.GenerationResult;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import org.example.edusmart.request.Public.ChatPojo;
import org.example.edusmart.service.ChatService;
import org.example.edusmart.utils.QianWenChat;
import org.springframework.stereotype.Service;

@Service
public class ChatServiceImpl implements ChatService {
    @Override
    public GenerationResult chatAi(ChatPojo chatPojo) throws NoApiKeyException, InputRequiredException {
        return  QianWenChat.callWithMessage(chatPojo);
    }
}